#ifndef FRMMAIN_H
#define FRMMAIN_H

#include <QMainWindow>
#include <QMessageBox>
#include <QListWidget>
#include <QDebug>
#include <QtNetwork/QtNetwork>
#include <QString>
#include <QException>
#include "config.h"
#include "frmmain.h"

namespace Ui {
class frmMain;
}

class frmMain : public QMainWindow
{
    Q_OBJECT

private slots:
    void getData();
    void getInit();
    void on_listWidget_itemClicked(QListWidgetItem *item);

    void on_btnAddbook_clicked();

    void on_btnDelete_clicked();


public:

    explicit frmMain(QWidget *parent = 0);
    void init();
    ~frmMain();

private:
    Ui::frmMain *ui;
    Config* config;
    QTcpSocket* client;
    QString server;
    qint16 port;
    QString username;
    QString bookname;
};

#endif // FRMMAIN_H

